@PACKAGE_INIT@

cmake_minimum_required(VERSION 3.16)

if(SevenTools_FOUND)
    return()
endif()

set(SevenTools_FOUND False)

find_path(MACROS NAME "CppVersions.h" PATH_SUFFIXES "include/Macros")
find_path(THREADS NAME "ThreadPool.h" PATH_SUFFIXES "include/Threads")
find_path(UTILITY NAME "OperationStream.h" PATH_SUFFIXES "include/Utility")
if(MACROS STREQUAL "MACROS-NOTFOUND" OR
    THREADS STREQUAL "THREADS-NOTFOUND" OR
    UTILITY STREQUAL "UTILITY-NOTFOUND")
    return()
else()
    list(APPEND SevenTools_INCLUDE_DIRS ${MACROS} ${THREADS} ${UTILITY} @CMAKE_INSTALL_PREFIX@/include)
endif()
include_directories(${SevenTools_INCLUDE_DIRS})

if(WIN32)
    find_library(SevenTools_LIBRARY NAME SevenTools PATH_SUFFIXES "lib")
    if(SevenTools_LIBRARY STREQUAL "SevenTools_LIBRARY-NOTFOUND")
        return()
    else()
        find_library(RLib NAME SevenTools PATH_SUFFIXES "bin")
        get_filename_component(_EXT ${SevenTools_LIBRARY} EXT CACHE)
        if(RLib STREQUAL "RLib-NOTFOUND")
            if(_EXT MATCHES "\\.dll")
                return()
            else()
                add_library(SevenTools STATIC IMPORTED GLOBAL)
                set_target_properties(SevenTools PROPERTIES IMPORTED_LOCATION ${SevenTools_LIBRARY})
            endif()
        else()
            add_compile_definitions(SharedSevenTools)
            add_library(SevenTools SHARED IMPORTED GLOBAL)
            set_target_properties(SevenTools PROPERTIES IMPORTED_LOCATION ${RLib} IMPORTED_IMPLIB ${SevenTools_LIBRARY})
        endif()
    endif()
else()
    find_library(SevenTools_LIBRARY NAME SevenTools PATH_SUFFIXES "lib")
    if(SevenTools_LIBRARY STREQUAL "SevenTools_LIBRARY-NOTFOUND")
        return()
    else()
        get_filename_component(_EXT ${SevenTools_LIBRARY} EXT CACHE)
        if(_EXT MATCHES "\\.(so|dylib)")
            add_compile_definitions(SharedSevenTools)
            add_library(SevenTools SHARED IMPORTED GLOBAL)
        else()
            add_library(SevenTools STATIC IMPORTED GLOBAL)
        endif()
        set_target_properties(SevenTools PROPERTIES IMPORTED_LOCATION ${SevenTools_LIBRARY})
    endif()
endif()
get_filename_component(SevenTools_LIBRARY_DIRS ${SevenTools_LIBRARY} DIRECTORY)

set(SevenTools_VERSION @PROJECT_VERSION@)

set(SevenTools_FOUND True)